/* eslint-disable no-multiple-empty-lines */
<template>
  <div>
    <Authc permissions="trade:settlement:cmb">
      <div>
        <a style="margin: 0 4px;" v-if="showbtn" @click="handleDetail('abnormal')">差异处理</a>
        <a @click="handleDetail('remark')">人工备注</a>
      </div>
    </Authc>
  </div>
</template>
<script>
  import {
    Icon,
    Tooltip,
    Message,
    Modal
  } from "view-design";
  // import {
  //   namespace
  // } from "../../module/blanketModule";
  import Authc from "@/components/Authc";

  export default {
    props: {
      row: Object,
      showbtn: Boolean
    },
    model: {
      event: ["onEdit"]
    },
    components: {
      Icon,
      Tooltip,
      Message,
      Authc
    },
    data: function() {
      return {};
    },
    created () {},
    methods: {
      handleDetail(type) {
        let id = this.$props.row.subOrderId;
        let ids = this.$props.row.abnormalType === '3' ? this.$props.row.bankOrderId : this.$props.row.subOrderId;
        let abnormalType = this.$props.row.abnormalType;
        let code = this.$props.row.productCode;
        switch (type) {
          case 'abnormal':
            this.$router.push({
                path: '/settlement/admin/SettlementCenter/ClearingAbnormalForm', query: { id: id, code: code }
            });
            break
          case 'remark':
            this.$router.push({
                path: '/settlement/admin/SettlementCenter/ClearingAbnormaRemarklForm', query: { id: ids, abnormalType: abnormalType }
            });
            break
          default:
        }
      }}
  };
</script>
<style lang="less">
  .normal-icon-style {
    font-size: 20px !important;
    color: #57a3f3 !important;
  }

  .error-icon-style {
    font-size: 20px !important;
    color: #ff0000 !important;
  }
</style>
